package com.papper.common.bean.sys;

import com.alibaba.fastjson.annotation.JSONField;
import com.papper.common.bean.BaseEntity;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @Author:LaJiao
 * @Date:2017-08-03 14:31:11
 * @Description:用户信息
 */
@Table(name = "sys_user")
public class SysUser extends BaseEntity {
	// 自增ID
	@Id
	@GeneratedValue(generator = "JDBC")
	private Long    id;
	// 归属系统
	@Column(name = "system_id")
	private Integer systemId;
	// 登录账号
	@Column(name = "login_name")
	private String  loginName;
	// 登录密码
	@Column(name = "login_pass")
	@JSONField(serialize = false)
	private String  loginPass;
	// 用户昵称
	@Column(name = "user_nick")
	private String  userNick;
	// 手机号码
	@Column(name = "user_phone")
	private String  userPhone;
	// 邮箱
	@Column(name = "user_email")
	private String  userEmail;
	// 所属组
	@Column(name = "group_id")
	private Integer groupId;
	// 父用户ID
	@Column(name = "parent_id")
	private Integer parentId;
	// 所属ID组串
	@Column(name = "family")
	private String  family;
	// 子用户个数
	@Column(name = "user_child")
	private Integer userChild;
	// 最后登录IP
	@Column(name = "last_ip")
	private String  lastIp;
	// 登录KEY信息
	@Column(name = "key_code")
	private String  keyCode;
	// 映射ID
	@Column(name = "mapping_id")
	private Integer mappingId;
	// 商户ID
	@Column(name = "mapping_user_id")
	private Integer mappingUserId;
	// 合作商ID
	@Column(name = "mapping_sp_id")
	private Integer mappingSpId;
	// 通道ID
	@Column(name = "mapping_channel_id")
	private Integer mappingChannelId;
	// 权限类型
	@Column(name = "limit_type")
	private Integer limitType;
	// 数据状态
	@Column(name = "data_status")
	private Integer dataStatus;
	// 创建时间
	@Column(name = "create_time")
	private Date    createTime;
	// 更新时间
	@Column(name = "modify_time")
	private Date    modifyTime;
	// 匹配代理ID
	@Column(name = "mapping_agent_id")
	private Integer mappingAgentId;
	// 用户等级
	@Transient
	private Integer userLevel;

	/**
	 * get/set
	 */
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getSystemId() {
		return systemId;
	}

	public void setSystemId(Integer systemId) {
		this.systemId = systemId;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getLoginPass() {
		return loginPass;
	}

	public void setLoginPass(String loginPass) {
		this.loginPass = loginPass;
	}

	public String getUserNick() {
		return userNick;
	}

	public void setUserNick(String userNick) {
		this.userNick = userNick;
	}

	public String getUserPhone() {
		return userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public Integer getGroupId() {
		return groupId;
	}

	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getFamily() {
		return family;
	}

	public void setFamily(String family) {
		this.family = family;
	}

	public Integer getUserChild() {
		return userChild;
	}

	public void setUserChild(Integer userChild) {
		this.userChild = userChild;
	}

	public String getLastIp() {
		return lastIp;
	}

	public void setLastIp(String lastIp) {
		this.lastIp = lastIp;
	}

	public String getKeyCode() {
		return keyCode;
	}

	public void setKeyCode(String keyCode) {
		this.keyCode = keyCode;
	}

	public Integer getMappingId() {
		return mappingId;
	}

	public void setMappingId(Integer mappingId) {
		this.mappingId = mappingId;
	}

	public Integer getLimitType() {
		return limitType;
	}

	public void setLimitType(Integer limitType) {
		this.limitType = limitType;
	}

	public Integer getDataStatus() {
		return dataStatus;
	}

	public void setDataStatus(Integer dataStatus) {
		this.dataStatus = dataStatus;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Integer getUserLevel() {
		return userLevel;
	}

	public void setUserLevel(Integer userLevel) {
		this.userLevel = userLevel;
	}

	public Integer getMappingUserId() {
		return mappingUserId;
	}

	public void setMappingUserId(Integer mappingUserId) {
		this.mappingUserId = mappingUserId;
	}

	public Integer getMappingSpId() {
		return mappingSpId;
	}

	public void setMappingSpId(Integer mappingSpId) {
		this.mappingSpId = mappingSpId;
	}

	public Integer getMappingChannelId() {
		return mappingChannelId;
	}

	public void setMappingChannelId(Integer mappingChannelId) {
		this.mappingChannelId = mappingChannelId;
	}

	public Integer getMappingAgentId() {
		return mappingAgentId;
	}

	public void setMappingAgentId(Integer mappingAgentId) {
		this.mappingAgentId = mappingAgentId;
	}
}